 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
           "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

  <!-- REQUIRED: Include Facebook XMLNS (XML namespace). -->
  <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
    <head>
      <style>
        html, body {height: 100%;}

#wrap {min-height: 100%;}

#main {overflow:auto;
	padding-bottom: 150px;}  /* must be same height as the footer */

#footer {position: relative;
	margin-top: -150px; /* negative value of footer height */
	height: 150px;
	clear:both;}

/*Opera Fix*/
body:before {/* thanks to Maleika (Kohoutec)*/
content:"";
height:100%;
float:left;
width:0;
margin-top:-32767px;/* thank you Erik J - negate effect of float*/
}


      </style>

    </head>
      <body>
        <div id="user_nav">
          <%if user_signed_in?%>
            Signed in as <%= current_user.name %> Not you? <%= link_to "Sign out", destroy_user_session_path %>
          <%else%>
            <%=  link_to "Sign up", new_user_registration_path%> or <%= link_to "sign in", new_user_session_path %>.
          <%end%>
        </div>


                      <!-- REQUIRED: Include Facebook Javascript (with current locale). See Facebooker documentation. -->
      <%= fb_connect_javascript_tag(:lang => ::I18n.locale) %>

      <!-- REQUIRED: Include devise_facebook_connectable Javascripts. -->
      <%=javascript_include_tag :defaults, 'devise.facebook_connectable', 'application' %>
      <%= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js",:cache => true %>
      <%= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js",:cache => true %>
      <%= stylesheet_link_tag "http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/redmond/jquery-ui.css", :media => "screen", :cache =>  true  %>
      <!-- REQUIRED: Init Facebook Javascript (using jQuery). See Facebooker documentation. -->
      <%= init_fb_connect :XFBML, :js => :jquery %>
      
      <%= yield %>
      
    </body>
  </html>